package com.mall.web.controller.course.app;

import com.mall.common.annotation.Log;
import com.mall.common.core.controller.BaseController;
import com.mall.common.core.domain.AjaxResult;
import com.mall.common.core.page.TableDataInfo;
import com.mall.common.enums.BusinessType;
import com.mall.common.utils.poi.ExcelUtil;
import com.mall.course.course.domain.dto.CourseDto;
import com.mall.course.course.domain.vo.CourseVo;
import com.mall.course.course.service.IAppCourseService;
import com.mall.course.course.service.ICourseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
 * 课程Controller
 * 
 * @author mall
 * @date 2024-05-17
 */
@RestController
@RequestMapping("/app/course/course")
public class AppCourseController extends BaseController
{
    @Autowired
    private IAppCourseService courseService;

    /**
     * 查询课程列表
     */
    @GetMapping("/list")
    public TableDataInfo list(CourseDto courseDto)
    {
        startPage();
        List<CourseVo> list = courseService.selectCourseList(courseDto);
        return getDataTable(list);
    }

}
